<% render_each_notification_or_error @notifications, error: "notifications/shared/error" do |notification| %>
  <div
    class="mb-2 spec-notification <%= "unseen" unless notification.read? %>"
    data-notification-id="<%= notification.id %>">
    <%= render notification, notification: notification %>
  </div>
<% end %>

<% if @notifications.any? %>
  <% sub_path = params[:org_id].present? ? "#{params[:filter]}/#{params[:org_id]}" : params[:filter].to_s %>
  <div
    class="notifications-paginator"
    data-pagination-path="/notifications/<%= sub_path %>?offset=<%= @notifications.last.id %>"></div>
<% end %>
